package com.deer.wms.base.system.web.bill;

import com.deer.wms.base.system.model.bill.BillInDetailCriteria;
import com.deer.wms.base.system.model.bill.BillInDetailDto;
import com.deer.wms.base.system.model.bill.BillInMasterDto;
import com.deer.wms.base.system.service.bill.IBillInDetailService;
import com.deer.wms.common.core.controller.BaseController;
import com.deer.wms.common.core.page.TableDataInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 入库交接班统计
 */
@Controller
@RequestMapping("/in/billInPlan")
public class BillInPlanController extends BaseController {

    private String prefix = "in/billInPlan";
    @Autowired
    private IBillInDetailService billInDetailService;

    @RequiresPermissions("in:billInPlan:view")
    @GetMapping("/page")
    public String billInPlan() {
        return prefix + "/billInPlan";
    }


    @RequiresPermissions("in:billInPlan:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo findList(BillInDetailCriteria criteria){
        startPage();
        List<BillInDetailDto> list = billInDetailService.getBillInPlanList(criteria);
        return getDataTable(list);
    }
}
